package com.itheima.tliasmanager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.tliasmanager.pojo.domain.Emp;
import com.itheima.tliasmanager.pojo.Dto.GenderCount;
import com.itheima.tliasmanager.pojo.Dto.JobCount;
import com.itheima.tliasmanager.pojo.Dto.QueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {



    @Select("select * from emp where dept_id = #{id}")
    List<Emp> listByDeptId(Integer id);

    List<JobCount> countByJob();

    List<GenderCount> countByGender();

    @Select("select * from emp where username = #{username}")
    Emp selectByUsername(String username);

}
